"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
"   Anke's vim configuration   "
"   Updated date: 2022/09/05   "
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"

"******************************"
"### Closes compatible mode ###"
set nocompatible

"******************************"
"### Conmmand mode setting  ###"
    "Sets height of command line as 2. (defaut=1)
    set cmdheight=2
    "Shows command typed.
    set showcmd

"******************************"
"###     Mouse setting      ###"
    "Enables.mouse.support.
    set mouse=a
    "Enables the area selection.
    set selection=exclusive
    "Sets the selection mode.
    set selectmode=mouse,key

"******************************"
"###     Window setting     ###"
    "Sets the window position.
    " winpos 5 5   " Default now.
    "Sets the window size.
    " set lines=25 columns=90   " Default now

"******************************"
"###   Cursor line setting  ###"
    "Shows ruler and the status line of the cursor position of cursor line.
    set ruler
    "Always shows the status line. (1: doesn't show; 2: shows)
    set laststatus=2
    "Sets what the status line shows.
    set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
    "Highlights the cursor line.
    set cursorline

"******************************"
"###    Closes auto-wrap    ###"
set nowrap

"******************************"
"###   Cursor flickering    ###"
"set novisualbell
set vb   " Opens now.

"******************************"
"###   Shows line number    ###"
set number

"******************************"
"###   Highlights search    ###"
set hlsearch

"******************************"
"### Space and tab setting  ###"
    "Shows space and tab with grey dot and >~~~, respectively.
    highlight MyTabSpace guifg=darkgrey ctermfg=darkgrey
    match MyTabSpace /\t\| /
    setlocal list | set listchars=tab:>~,space:.
    "Does not convert tab to space antumatically.
    "set noexpandtab
    set expandtab
    "Sets the with of tab as four spaces.
    set shiftwidth=4
    "Inteprets tab as four spaces.
    set tabstop=4
    "When one hits the backspace, four spaces are treated as a tab and removed.
    set softtabstop=4
    "Makes backspace handle indent, eol and start normally.
    set backspace=indent,eol,start

"******************************"
"###  Indentation setting   ###"
    "Inherit the automatic indentation of the previous line.
    set autoindent


"******************************"
"###  Saves automatically   ###"
set autowrite

"******************************"
"###     Auto-loading       ###"
    "Loads automatically when file has been changed.
    set autoread

"******************************"
"###  Closes file backup    ###"
set nobackup

"******************************"
"### Swap file generation   ###"
    "Does not generate swap file.
    set noswapfile

"******************************"
"###       True colors      ###"
    set termguicolors

"******************************"
"******************************"
"******************************"
"******************************"